package 力扣日常刷题.木22二月.第07天213;

import 力扣日常刷题.TreeNode;

/**
 * @author 帅小伙
 * @date 2022/2/13
 * @description
 */
public class Demo52JZ二叉树的深度 {


    public int maxDepth(TreeNode root) {
        if (root == null) return 0;
        return Math.max(maxDepth(root.left), maxDepth(root.right)) + 1;
    }




}
